home *** CD-ROM | disk | FTP | other *** search
- ; $VER: UpdateWirenet 1.5 (21.10.96)
- ;
- ; This installer and the accompanying scripts are
- ; (c) Neil Bothwick, Wirenet Amiga Internet and may
- ; not be used in any other package without permission
-
-
- ;========================== Define Procedures ==========================
-
- (set ArcName 'UpdateWirenet.lzx')
- ;;; Abort with message
- (procedure GetOut GetOutMsg
- (message GetOutMsg)
- (exit (quiet))
- )
- ;;;
- ;;; Check archive was unarced correctly
- (procedure CheckUnarc
- (if (= 0 (exists 'Updates/Dashboard'))
- (GetOut
- (cat
- '\n' ArcName 'has not been unarchived correctly!\n\n'
- 'Type\n\n"unlzx x ' ArcName ' RAM:"\n\nin a shell and then '
- 'double click on the installer icon in RAM:'
- )
- )
- )
- )
- ;;;
- ;;; Make environment variable
- (procedure SetEnv EnvName EnvVal ; Creates environment variables in ENV: and ENVARC:
- (set ArcName (tackon 'ENVARC:' EnvName))
- (if (exists ArcName) ; Back it up if it already exists,
- (if (not (exists (cat ArcName '.old'))) ; has not been previously backed up
- (if (not(= EnvVal (getenv EnvName))) ; and is not the same value
- (rename ArcName (cat ArcName '.old'))
- )
- )
- )
- (textfile
- (dest (tackon 'ENVARC:' EnvName))
- (append EnvVal)
- )
- (textfile
- (dest (tackon 'ENV:' EnvName))
- (append EnvVal)
- )
- )
- ;;;
-
- (CheckUnarc) ; ensure archive was unpacked with paths preserved
- (welcome)
-
- ;=========================== Install Scripts ===========================
- ;;; Introduction
- (message
- (cat
- '\nHello ' (getenv 'REALNAME') '\n\n'
- 'This will update your Wirenet software to the latest current setup.\n\n'
- 'This uses a different method of storing your configuration information '
- 'that will make it much easier to make any changes to your system later.\n\n'
- 'This will also make future upgrades much simpler.'
- )
- )
-
- (message
- (cat
- '\nThe installer will attempt to read your existing configuration information.\n\n'
- 'Please check these details carefully before proceeding with the installation. If you '
- 'have any doubts about this, then abort the installation and contact\n\n'
- 'support@wirenet.u-net.com\n\nbefore continuing.'
- )
- )
- ;;;
- ;;; Read existing configuration
- (working '\n\nReading your current configuration')
- (if (<> 0 (run 'rx ReadConfig.rexx' (safe)))
- (run 'sys:rexxc/rx ReadConfig.rexx' (safe))
- )
- ; Put values in variables
- (set
- DevName
- (if (exists 'ENV:WirenetUpdateDevice' (noreq))
- (getenv 'WirenetUpdateDevice')
- ''
- )
- DevUnit
- (if (exists 'ENV:WirenetUpdateUnit' (noreq))
- (getenv 'WirenetUpdateUnit')
- ''
- )
- Speed
- (if (exists 'ENV:WirenetUpdateSpeed' (noreq))
- (getenv 'WirenetUpdateSpeed')
- ''
- )
- PopNum
- (if (exists 'ENV:WirenetUpdatePopNum' (noreq))
- (getenv 'WirenetUpdatePopNum')
- ''
- )
- Password
- (if (exists 'ENV:WirenetUpdatePassword' (noreq))
- (getenv 'WirenetUpdatePassword')
- ''
- )
- )
- ; Remove temporary environment variables
- (run 'delete >NIL: ENV:WirenetUpdate#?' (safe))
- ;;;
- ;;;Confirm configuration details
- (procedure ConfirmConfig
- (set
- DevName
- (askstring
- (prompt '\nPlease enter the name of your serial device')
- (default DevName)
- (help 'This should be as you gave when installing the Wirenet package')
- )
- DevUnit
- (askstring
- (prompt '\nPlease select the unit number of ' DevName)
- (default DevUnit)
- (help '\nThis is usually 0')
- )
- Speed
- (askstring
- (prompt '\nPlease enter the speed of your serial connection')
- (default Speed)
- (help 'This should be as you gave when installing the Wirenet package')
- )
- ModemInit
- (askstring
- (prompt '\nPlease enter the initialisation string for your modem')
- (help 'This should be as you gave when installing the Wirenet package')
- (default 'ATZ')
- )
- ModemDial
- (askstring
- (prompt '\nPlease enter the dial string for your modem')
- (help 'This should be as you gave when installing the Wirenet package')
- (default 'ATDT')
- )
- PopNum
- (askstring
- (prompt '\nPlease enter your local access telephone number')
- (help 'This should be as you gave when installing the Wirenet package')
- (default PopNum)
- )
- Password
- (askstring
- (prompt '\nPlease enter your Password')
- (help 'This should be as you gave when installing the Wirenet package - unless you have changed it since then')
- (default Password)
- )
- )
- ; Verify information
- (askbool
- (prompt
- (cat
- 'You gave the following details about your configuration\n'
- '\nDevice name: ' DevName
- '\nUnit number: ' DevUnit
- '\nSerial link speed: ' Speed
- '\nInitialisation string: ' ModemInit
- '\nDial String: ' ModemDial
- '\nTelephone number: ' PopNum
- '\nPassword: ' Password
- '\n\nPlease check these details carefully.'
- )
- )
- (help '\n\nPlease check these carefully.\n\nDo not proceed unless you are sure they are correct.')
- (choices 'Let me change them' 'They are correct')
- )
- )
-
- (while (ConfirmConfig))
- ;;;
- ;;; Create environment variables
- (makedir 'ENV:Wirenet')
- (makedir 'ENVARC:Wirenet')
- (SetEnv 'MAILSERVER' 'mail.u-net.com')
- (SetEnv 'NEWSSERVER' 'news.u-net.com')
- (SetEnv 'SMTPSERVER' 'send.mail.u-net.com')
-
- (if (not (exists 'ENV:MAILBOX'))
- (SetEnv 'MAILBOX' (cat (getenv 'USERNAME') '-' (getenv 'NODENAME')))
- )
- (setenv 'Wirenet/ModemDev' (cat DevName ' ' DevUnit))
- (setenv 'Wirenet/ModemSpeed' Speed)
- (setenv 'Wirenet/ModemInit' ModemInit)
- (setenv 'Wirenet/ModemDial' ModemDial)
- (setenv 'Wirenet/PopNum' PopNum)
- (setenv 'Wirenet/ppp.options' 'CD 7WIRE EOFMODE')
- (setenv 'Wirenet/Gateway' '193.119.176.1')
- (setenv 'Wirenet/DialWindow' 'CON:20/50/400/160/Dialing.../INACTIVE')
- (setenv 'Wirenet/MTU' '1500')
- (setenv 'Wirenet/pap.config' (cat (getenv 'NODENAME') ' ' Password))
- (if (exists 'S:PPP.key')
- (if
- (askbool
- (prompt '\nYou are using the registered version of ppp.device\n\nWould you like to use PAP logins?\n\n')
- (help '\nPAP (Password Authentication Protocol) provides for faster logins')
- (default 0)
- )
- (SetEnv 'Wirenet/UsePAP' 'true')
- (run 'delete >NIL: ENVARC:Wirenet/UsePAP')
- )
- )
- ;;;
- ;;; Copy Dashboard
- (copylib
- (prompt 'Updating Dashboard')
- (help @copylib-help)
- (source 'Updates/Dashboard')
- (dest 'AmiTCP:')
- (confirm)
- )
- (copyfiles
- (prompt 'Updating Dashboard')
- (help @copyfiles-help)
- (source 'Updates/Dashboard.gui')
- (dest 'AmiTCP:')
- )
- ;;;
- ;;;Copy Connect
- (copylib
- (prompt 'Updating Connect')
- (help @copylib-help)
- (source 'Updates/Connect')
- (dest 'AmiTCP:bin')
- (confirm)
- )
- ;;;
- ;;; Copy Fetch
- (copylib
- (prompt 'Updating Fetch')
- (help @copylib-help)
- (source 'Updates/Fetch')
- (dest 'AmiTCP:bin')
- (confirm)
- )
- ;;;
- ;;; Copy SendEvents
- (copylib
- (prompt 'Updating SendEvents')
- (help @copylib-help)
- (source 'Updates/SendEvents')
- (dest 'AmiTCP:bin')
- (confirm)
- )
- ;;;
- ;;; Copy StartNet & StopNet
- (copylib
- (prompt 'Updating StartNet')
- (help @copylib-help)
- (source 'Updates/StartNet')
- (dest 'AmiTCP:bin')
- (confirm)
- )
-
- (copylib
- (prompt 'Updating Stopnet')
- (help @copylib-help)
- (source 'Updates/Stopnet')
- (dest 'AmiTCP:bin')
- (confirm)
- )
- ;;;
- ;;; Copy Documentation
- (foreach 'Updates' '#?.guide'
- (copylib
- (prompt 'Updating Documentation')
- (help @copylib-help)
- (source (tackon 'Updates' @each-name))
- (dest 'AmiTCP:doc')
- (confirm)
- )
- )
- ;;;
- ;Copy User files to AmiTCP:db
- (foreach 'Updates' 'User-#?'
- (if (= 0 (exists (tackon 'AmiTCP:db' @each-name)))
- (copyfiles
- (prompt (cat 'Copying ' @each-name))
- (help @copyfiles-help)
- (source (tackon 'Updates' @each-name))
- (dest 'AmiTCP:db')
- )
- )
- )
-
- (message '\n\nThe updated Wirenet software has now been installed.')
- (exit (quiet))
-
-